package com.itheima.dom4j;

import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import org.junit.Test;

import java.io.InputStream;

/**
 * @author Anomaly
 * @date 2023/2/12 22:39
 */
public class DomDemo {
    @Test
    public void parseXMLData() throws Exception {
        SAXReader saxReader = new SAXReader();
        InputStream is = DomDemo.class.getResourceAsStream("/Contacts.xml");
        Document document = saxReader.read(is);

        Element root = document.getRootElement();

    }
}
